package com.basker.pisces.autoconfig;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;

import com.basker.pisces.config.ApplicationConfig;
import com.basker.pisces.constant.Constants;
import com.basker.pisces.core.resource.ResourceLoaderManager;
import com.basker.pisces.spring.SpringApplicationContext;
import com.basker.pisces.spring.SpringContants;

@Configuration
@ImportResource(locations = {SpringContants.DEFAULT_APPLICATION_CONTEXT_XML, SpringContants.DEFAULT_BEAN_XML,
        SpringContants.DEFAULT_BEANS_XML})
@ComponentScan(Constants.BASE_PACKAGE_NAME)
public class FrameworkAutoConfiguration {

    @Bean
    public ApplicationConfig applicationConfig() {
        return new ApplicationConfig();
    }

    @Bean
    public ResourceLoaderManager resourceLoaderManager() {
        return new ResourceLoaderManager();
    }

    @Bean
    public SpringApplicationContext springApplicationContext() {
        return new SpringApplicationContext();
    }

}
